<?php

namespace frontend\controllers;

use common\models\Location;
use Yii;
use yii\web\Controller;
use yii\web\Response;

class LocationController extends Controller
{
    public function actionDetail($id)
    {
        Yii::$app->response->format = Response::FORMAT_JSON;
        $location = Location::findOne($id);
        return $location;
    }
}